package com.atguigu.day17.work2;

import java.util.Arrays;

public class Work06 {
    public static void main(String[] args) {
        String[] arr = {"bca","dadfa","dddaaa","你好啊","我来啦","你干嘛呢","别跑啊"};
        System.out.println(Arrays.toString(arr));
        int index=0;
        while (index<arr.length){
            if (arr[index].length()>5){
                System.arraycopy(arr,index+1,arr,index,arr.length-index-1);
                arr=Arrays.copyOf(arr,arr.length-1);
            }else{
                index++;
            }
        }
        System.out.println(Arrays.toString(arr));
    }
}
